<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>class</title>
</head>
<body>
    

    <script>
        class Father {
            constructor () {
                //console.log(new.target.name)
                console.log('faher',this)
            }

            a () {
                console.log('a');
            }
        }
        class Demo extends Father {
            constructor () {
                super()

                console.log('demo',this)
            }
        }

        new Father();
        new Demo();
    </script>
</body>
</html>